/**
 * @Description:
 * @Author bianpengfei
 * @create 2021/4/11 13:51
 */
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import Vue from 'vue'
import bootstrap from './libs/bootstrap'
import router from './router/'
import store from './store/'
import App from './App.vue'
import api from '@/api/index'

const isProduction = process.env.NODE_ENV === 'production'

if (isProduction) {
  //系统错误捕获
  Vue.config.errorHandler = (error, vm) => {
    console.error('全局捕捉   异常')
    console.error(vm)
    console.error(error)
    store.commit('app/loading', false)
  }
}

Vue.use(bootstrap)
Vue.use(api)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')
